/**
 * Created with Vim7.3 ubuntu12.04
 * @fileOverview : 
 * @author : Lyle
 * @since : 2015-05-05 22:08:23
 * @filename : src/controllers/login.js
 * @version : 
 * @description : 
 */

define(['text!'+$Global.view+'/login.tpl'],function(tpl) {
   
    var LoginView, 
        mId = 'login', 
        reRender = false,
        reload = false;
 
        LoginView = Backbone.View.extend({

        el: 'body',

        template: _.template(tpl),

        bindEvt : function() {
            var tthis = this;
            $('#'+mId).find('.index').on('click',function() {
                Backbone.appRouter.navigate('index', { trigger: true });
            });
        },      

        render: function (obj) {

            $Share.permission(true); 
            $Share.reload(reload,mId);
            $Share.reRender(reRender,mId);

            if ($('#'+mId).length < 1) { 
                $('body').append(this.template($Lang)); 
                this.bindEvt(); 
            }
        }

    });

    return LoginView;
});


